﻿<UserControl xmlns:my="clr-namespace:ESRI.ArcGIS.Client.Toolkit;assembly=ESRI.ArcGIS.Client.Toolkit"      CacheMode="BitmapCache"
x:Class="JsAndSilverLight.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:SL="clr-namespace:JsAndSilverLight"
xmlns:esriToolkit="clr-namespace:ESRI.ArcGIS.Client.Toolkit;assembly=ESRI.ArcGIS.Client.Toolkit"
Width="800" Height="700" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">


    <Grid x:Name="LayoutRoot" Background="White">
 

        <!--扩展范围 End -->
        <esri:Map x:Name="Map1"  Progress="Map1_Progress" ExtentChanged="Map1_ExtentChange" Margin="0,0,0,130" MouseMove="Map1_MouseMove">

        	<!--
                动态加载图层调用
                Arcgis服务
                -->
        	<!--<esri:ArcGISDynamicMapServiceLayer
                x:Name="ArcGISDynamicMapServiceLayerObj"
                 ID="ArcGISDynamicMapServiceLayerObj"
        		InitializationFailed="ArcGISTiledMapServiceLayer_InitializationFailed"
        		 />-->
<!--Url="http://192.168.89.129/ArcGIS/rest/services/US/MapServer/"-->
            <!--添加一个绘画图层-->
            <esri:GraphicsLayer ID="MyGraphicsLayer"/>

            <esri:ElementLayer>
                <!--Clickable button-->
                <Button x:Name="RedlandsButton" Width="20" Height="20" Content="X" 
				        esri:ElementLayer.Envelope="-117,34,-117,34"
				        VerticalAlignment="Center" HorizontalAlignment="Center"
				       />

                <!--Arrow pointing at Copenhagen from the right-->
                <TextBlock Text="&lt;=" HorizontalAlignment="Right" 
						   FontSize="15" Foreground="Blue" FontWeight="Bold"
						   esri:ElementLayer.Envelope="12.5698,55.6765,12.5698,55.6765" />
                <!--Arrow pointing at Copenhagen from the left-->
                <TextBlock Text="=&gt;" HorizontalAlignment="Left" 
						   FontSize="15" Foreground="Blue" FontWeight="Bold"
						   esri:ElementLayer.Envelope="12.5698,55.6765,12.5698,55.6765" />

                <!-- Red box - No size specified. Envelope guides the size -->
                <Rectangle Fill="Red" esri:ElementLayer.Envelope="0,0,10,10" />

                <!--Editable textbox-->
                <TextBox Width="100" Height="20" esri:ElementLayer.Envelope="40,0,40,0"
						 Text="Editable text" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
            </esri:ElementLayer>
        </esri:Map>



        <StackPanel Height="110" Margin="0,0,8,20" VerticalAlignment="Bottom" Orientation="Horizontal" d:LayoutOverrides="GridBox">


    		<!--map animation slider-->

    		<Canvas Width="215" Height="130" HorizontalAlignment="Left">

    			<Rectangle Style="{StaticResource rectBottom}" Height="83" />

    			<Rectangle Style="{StaticResource rectMiddle}" Height="130" />

    			<Rectangle Style="{StaticResource rectTop}" Height="110" />

    			<StackPanel Orientation="Vertical" Margin="20,15,15,0">

    				<TextBlock HorizontalAlignment="Left" Text="设置地图缩放动作持续时间：" TextWrapping="Wrap" FontWeight="Bold" />

    				<TextBlock x:Name="TBzoomdurationvalue" HorizontalAlignment="Left" Text="当前值：" TextWrapping="Wrap" FontWeight="Bold" />

    				<Slider x:Name="sliderzoomanimation" Orientation="Horizontal" Minimum="0" Maximum="20" SmallChange="1"

    					LargeChange="5" Cursor="Hand" ValueChanged="slideranimation_ValueChanged" Width="180" />

    				<TextBlock HorizontalAlignment="Left" Text="设置地图平移动作持续时间：" TextWrapping="Wrap" FontWeight="Bold" />

    				<TextBlock x:Name="TBpandurationvalue" HorizontalAlignment="Left" Text="当前值：" TextWrapping="Wrap" FontWeight="Bold" />

    				<Slider x:Name="sliderpananimation" Orientation="Horizontal" Minimum="0" Maximum="20" SmallChange="1"

    					LargeChange="5" Cursor="Hand" ValueChanged="slideranimation_ValueChanged" Width="180" />

    			</StackPanel>

    		</Canvas>

    		<!--扩展范围-->
    		<Canvas Width="215" Height="110" HorizontalAlignment="Left">

    			<Rectangle Style="{StaticResource rectBottom}" />

    			<Rectangle Style="{StaticResource rectMiddle}" />

    			<Rectangle Style="{StaticResource rectTop}" />

    			<TextBlock x:Name="TBextent" Margin="20,15,15,0" Text="范围：" TextWrapping="Wrap" FontWeight="Bold" />
    		</Canvas>
    		<!--mouse coords-->

    		<Canvas Width="215" Height="110" HorizontalAlignment="Left" VerticalAlignment="Top">

    			<Rectangle Style="{StaticResource rectBottom}" />

    			<Rectangle Style="{StaticResource rectMiddle}" />

    			<Rectangle Style="{StaticResource rectTop}" />

    			<StackPanel Orientation="Vertical" Margin="20,15,15,0">

    				<TextBlock x:Name="TBscreencoords"

    					HorizontalAlignment="Left" VerticalAlignment="Center" Text="屏幕坐标：" TextWrapping="Wrap" FontWeight="Bold" />

    				<TextBlock x:Name="TBmapcoords"

    					HorizontalAlignment="Left" VerticalAlignment="Center" Text="地图坐标：" TextWrapping="Wrap" FontWeight="Bold" />
    			</StackPanel>

    		</Canvas>

            <Canvas HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="27.142" Margin="0,0,8,20" d:LayoutOverrides="Height" Width="30.5">
                <esri:ScaleBar x:Name="scalebar" MapUnit="Feet" DisplayUnit="Millimeters" Foreground="Black" FillColor1="White" FillColor2="Blue" />
            </Canvas>


            <!--工具栏-->
            <!--END:工具栏-->
        </StackPanel>
    	<Rectangle Height="20.934" HorizontalAlignment="Right" Margin="0,0,8,135.142" VerticalAlignment="Bottom" Width="47.311" Fill="#FFFFFFFF" Stroke="#FF000000" StrokeThickness="0" d:LayoutOverrides="Width" d:IsLocked="True"/>
    	<Canvas VerticalAlignment="Top" Width="215" Height="50"  
    		HorizontalAlignment="Left" Margin="0,0,0,0">
    		<!--工具栏边框效果-->
    		<Rectangle  RadiusX="10" RadiusY="10"
    			Fill="#22000000" Canvas.Left="5" Canvas.Top="5"
    			Width="215" Height="50"/>
    		<Rectangle   RadiusX="10" RadiusY="10" 
    			Fill="#775c90b2" Canvas.Left="0" Canvas.Top="0"
    			Width="215" Height="50" Stroke="Gray"/>
    		<Rectangle RadiusX="5" RadiusY="5"
    			Fill="#FFFFFFFF" Canvas.Left="10" Canvas.Top="10"
    			Width="195" Height="30" Stroke="DarkGreen"/>
    		<!--工具-->
    		<StackPanel Canvas.Left="12" Canvas.Top="12" Orientation="Horizontal">
    			<Button Content="点" Height="25" Width="25" Click="Button_Click"/>
    			<Button Content="线" Height="25" Width="25" Click="Button_Click"/>
    			<Button Content="框" Height="25" Width="25" Click="Button_Click"/>
    			<Button Content="面" Height="25" Width="25" Click="Button_Click"/>
    			<Button Content="任意" Height="25" Width="30" Click="Button_Click"/>
    			<Button Content="取消" Height="25" Width="30" Click="Button_Click"/>
    			<Button Content="清空" Height="25" Width="30" Click="Button_Click"/>
    		</StackPanel>
    	</Canvas>
        <!--工具栏-->
        <Canvas VerticalAlignment="Top" Height="50" Margin="219,0,366,0">
            <!--工具栏边框效果-->
            <Rectangle  RadiusX="10" RadiusY="10"
                   Fill="#22000000" Canvas.Left="5" Canvas.Top="5"
                   Width="145" Height="50"/>
            <Rectangle   RadiusX="10" RadiusY="10" 
                   Fill="#775c90b2" Canvas.Left="0" Canvas.Top="0"
                   Width="145" Height="50" Stroke="Gray"/>
            <Rectangle RadiusX="5" RadiusY="5"
                   Fill="#FFFFFFFF" Canvas.Left="10" Canvas.Top="10"
                   Width="125" Height="30" Stroke="DarkGreen"/>
            <!--工具-->
            <StackPanel Canvas.Left="12" Canvas.Top="12" Orientation="Horizontal">
                <Button Content="放大" Height="25" Width="30" Click="Button_Click"/>
                <Button Content="缩小" Height="25" Width="30" Click="Button_Click"/>
                <Button Content="平移" Height="25" Width="30" Click="Button_Click"/>
                <Button Content="全图" Height="25" Width="30" Click="Button_Click"/>

            </StackPanel>
        </Canvas>
        <!--END:工具栏-->



        <Canvas Margin="325,291,325,0" VerticalAlignment="Top" Height="48"  x:Name="CanvasObj">
            <ProgressBar x:Name="MyProgressBar" Minimum="0" Maximum="100"  Width="150" Height="30"/>
            <TextBlock x:Name="ProgressValueTextBlock" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" Canvas.Top="34" Canvas.Left="53" />

        </Canvas>
        <Canvas VerticalAlignment="Top" Height="269" Width="55" HorizontalAlignment="Right" Margin="0,-16,0,0">
            
            <SL:MapSilder  x:Name="mapSilder" ></SL:MapSilder>
        </Canvas>
        <!--  地图汽泡提示  -->
        <Canvas HorizontalAlignment="Left" VerticalAlignment="Top" >
            <esriToolkit:MapTip x:Name="MyMapTip"  BorderBrush="#99000000" 
                BorderThickness="1" Title="显示的信息" VerticalOffset="10" 
                HorizontalOffset="10" Background="#DDFFFFFF" />
        </Canvas>
        <!-- 鹰眼  -->
        <Grid HorizontalAlignment="Right" Width="153" Canvas.ZIndex="100" Margin="0,0,0,20" VerticalAlignment="Bottom" Height="106" >
            <Border CornerRadius="10,10,10,10" Background="#DD355672" Grid.Row="1" Grid.Column="1">
                <esriToolkit:OverviewMap x:Name="MyOverviewMap" Margin="8,8,8,8" MaximumExtent="-180,-90,180,90">
                </esriToolkit:OverviewMap>
            </Border>
        </Grid>

        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" d:LayoutOverrides="GridBox" Margin="0,8,8,0" Width="182" VerticalAlignment="Top" Height="151">
            <esriToolkit:Navigation x:Name="MyNavigation"   Margin="5"  />
        </StackPanel>
    </Grid>

</UserControl>

